package com.integrationpath.mengine.webservice.impl;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

import com.integrationpath.mengine.service.WebServicesManager;
import com.integrationpath.mengine.webservice.RestWebServicesManager;
import com.integrationpath.mengine.webservice.dto.Articles;

@Path("/articlesservice/")
@Produces({"application/json", "application/xml"})
public class RestWebServicesManagerImpl implements RestWebServicesManager {
	
	WebServicesManager webServicesManager;
	
	public WebServicesManager getWebServicesManager() {
		return webServicesManager;
	}

	public void setWebServicesManager(WebServicesManager webServicesManager) {
		this.webServicesManager = webServicesManager;
	}

	@GET
	@Path("/articles")
	public Articles getArticles() {
		Articles articles = new Articles();
		articles.setArticles(webServicesManager.getArticles());
		return articles;
	}
	
	@GET
	@Path("/test")
	public String getString() {
		return "test";
	}	
	
}